<?php 
	$logo = EVENT_STATIC_SERVER.'/images/nophoto.gif';
	if($this->event->logo != "")
		$logo = EVENT_IMG_URL_PATH.'/'.$this->event->logo;
	$memberStatus = $this->memberStatus;
?>
			<!-- Start: box Avata -->
            <div class="my-box">
                <div class="my-avata" style="float:left;">
                    <div class="imageWrap"> 
                        <?php if($memberStatus['isAdmin']){?>
                        <a href="/event/edit/picture/<?php echo $this->event->eid;?>" style="position:absolute;margin-left:148px;"><img src="<?php echo EVENT_STATIC_SERVER;?>/images/edit.jpg" width="52" height="22" /></a>
                        <?php }?>
                    	<img src="<?php echo $logo;?>" alt="my avata" title="" onload="resizeImage(this,200, 200)"/> 
                    </div>
                    <div id="manage_div">
	                    <?php if($this->isAdmin){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> <a href="/event/edit/<?php echo $this->event->eid;?>">Sửa thông tin</a> <span>&nbsp;</span> <a href="/event/edit/member/<?php echo $this->event->eid;?>">Sửa thành viên</a> </div>
	                        </div>
	                    </div>
	                    	<?php if ($this->event->request_count>0){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> <a href="/event/accept/<?php echo $this->event->eid;?>">Danh sách xin vào sự kiện</a></div>
	                        </div>
	                    </div>
							<?php }?>
	                    <?php }?>
	                    
	                    <?php if($memberStatus['isMember']){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> 
	                        	<?php if($this->isPublic && !$this->isAdmin){?>
	                        		<a href="/event/edit/member/<?php echo $this->event->eid;?>">Mời vào sự kiện</a> <span>&nbsp;</span>
	                        	<?php }?>
	                        		<a href="#" onClick="event_common.leaveEvent(<?php echo $this->event->eid;?>, true);">Ra khỏi sự kiện</a> 
	                        	</div>
	                        </div>
	                    </div>
	                    <?php }?>
	                    <?php if( !$memberStatus['isMember'] && ($memberStatus['isInvited'] || $memberStatus['isMaybe'] || $this->isPublic)){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> 
	                        		<a href="#" onClick="event_common.joinEvent(<?php echo $this->event->eid;?>, true);">Tham gia sự kiện</a> 
	                        </div>
	                        </div>
	                    </div>
	                    <?php }
	                    	else if( !$memberStatus['isMember'] && (!$memberStatus['isRequest'] && $this->isPrivate)){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> 
	                        		<a href="#" onClick="event_common.requestEvent(<?php echo $this->event->eid;?>);">Xin tham gia sự kiện</a> 
	                        </div>
	                        </div>
	                    </div>
	                    <?php }?>
             <!--va-->  <?php if( !$memberStatus['isMember'] && ($memberStatus['isInvited'] || $memberStatus['isMaybe'] || $this->isPremium)){?>
                        <div class="control" style="float:left;">
                            <div class="controlLeft">
                                <div class="controlRight"> 
                                    <a href="#" onClick="window.open('http://tamtay.vn/event/buyticket/<?=$this->event->eid?>','popuppage','width=500,height=400,top=100,left=100');">Mua vé tham gia sự kiện</a> 
                            </div>
                            </div>
                        </div>
                        <?php }?>   <!--va-->
	                    <?php if($this->isAdmin){?>
	                    <div class="control" style="float:left;">
	                        <div class="controlLeft">
	                            <div class="controlRight"> <a href="/event/cancel/<?php echo $this->event->eid;?>">Huỷ sự kiện</a></div>
	                        </div>
	                    </div>
	                    <?php }?>
	                    
	                </div>
	                <div id="attend_loader" style="text-align:center; display:none;"><img src="<?php echo EVENT_STATIC_SERVER;?>/images/loader.gif" /></div>
                </div>
                <div class="clear"></div>
                <div class="bottom"></div>
            </div>
            <!-- End: box Avata -->